import request from '@/utils/request'

let myMoneyApi = {
  // 余额变动记录
  getList(data) {
    return request({
      url: '/moneyChangeRecord/list',
      method: 'get',
      params:data
    })
  },
  // 提现
  addTixian(data) {
    return request({
      url: '/withdrawalRecord',
      method: 'post',
      data
    })
  },
  // 提现记录
  withdrawalRecordList(params) {
    return request({
      url: '/withdrawalRecord/list',
      method: 'get',
      params
    })
  },
  // 充值虞豆
  addJifen(data) {
    return request({
      url: `/mall/goodsInfo/createRechargeGoodsInfo`,
      method: "post",
      data,
    });
  },
  // 查询充值虞豆的支付结果
  queryJifenPayState(data) {
    return request({
      url: `/mall/goodsInfo/queryOrder`,
      method: "post",
      data,
    });
  },
  //充值虞豆的支付结果 轮询
  queryJifenPayStateInterval(params) {
    return request({
      url: `/mall/goodsInfo/queryOrder`,
      method: "get",
      params,
    });
  },



  
  // 保证金
  // 充值保证金
  addBzj(data) {
    return request({
      url: `/userPayOrderRecord/create`,
      method: "post",
      data,
    });
  },
 //充值虞豆的支付结果 轮询
 payBzjStateInterval(params) {
  return request({
    url: `/userPayOrderRecord/payStatus`,
    method: "get",
    params,
  });
},
  //充值虞豆的支付结果 
  payBzjStateHander(data) {
    return request({
      url: `/userPayOrderRecord/queryOrder`,
      method: "post",
      data,
    });
  },
  // 保证金变动明细 /userPayOrderRecord/list
  userPayOrderRecordList(params) {
    return request({
      url: `/userPayOrderRecord/list`,
      method: "get",
      params,
    });
  },
  // 查询活动信息
  activitySettingsGetByType(params) {
    return request({
      url: `/activitySettings/getByType`,
      method: "get",
      params,
    });
  },
   // 根据充值金额计算虞豆数
   getCountInfoByType(data) {
    return request({
      url: `/mall/goodsInfo/getCountInfoByType`,
      method: "post",
      data,
    });
  },

    // 新增收款账户
    addBankcard(data) {
      return request({
        url: `/userCollectionInfo`,
        method: "post",
        data,
      });
    },
    // 删除收款账户
    delBackcardListOne(id) {
      return request({
        url: `/userCollectionInfo/${id}`,
        method: "delete"
      });
    },
    // 查询收款账户列表
    getBackcardList(params) {
      return request({
        url: `/userCollectionInfo/list`,
        method: "get",
        params,
      });
    },


      // 充值短信包
  addDuanxin(data) {
    return request({
      url: `/account/tenant/dxcz`,
      method: "post",
      data,
    });
  },
  // 短信记录
  tenantSmsRecordList(params) {
    return request({
      url: `/tenantSmsRecord/list`,
      method: "get",
      params,
    });
  },


  //改版后的接口

  getTenant(id) {
    return request({
      url: `/account/tenant/${id}`,
      method: "get"
    });
  },
}
export default myMoneyApi

